<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
     function obj(arr){
        return Array.from(new Set(arr))
     }

     function obj2(arr){
       let newArr= [];
       for (let i = 0;i < arr.length; i++) {
         if(newArr.indexOf(arr[i]) === -1){
          newArr.push(arr[i]);
         }
         
       }
       return newArr
     }

     let a = [1,2,3,4,5,5,6,7,3]
     let b = obj2(a);

console.log(b);



    </script>
    
</body>
</html>